from django import forms


class SearchForm(forms.Form):
    search_query = forms.CharField(
        label='搜索',
        widget=forms.TextInput(attrs={
            'class': 'form-control',
            'placeholder': '输入项目、BUG或任务关键词...'
        }),
        required=True
    )

    search_type = forms.ChoiceField(
        label='搜索类型',
        choices=[
            ('all', '全部'),
            ('project', '项目'),
            ('bug', 'BUG'),
            ('task', '任务')
        ],
        widget=forms.Select(attrs={'class': 'form-control'}),
        initial='all'
    )